package studyguide.ch09.graphics;

import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Graphics;

public class GraphicsCanvasI extends Canvas {

	protected void paint(Graphics g) {
		// Clear screen
		g.setColor(255, 255, 255);
		g.fillRect(0, 0, getWidth(), getHeight());
		
		// Vertical distance between objects:
		g.setColor(0); // Black

		int clipX = getWidth() / 20;
		int clipY = getHeight() / 20;
		
		g.setClip(clipX, clipY, getWidth() - 2*clipX, getHeight() - 2*clipY);
		
		g.fillArc(0, 0, getWidth(), getHeight(), 0, 360);
	}

}
